﻿@model WXUserInfoSiteModel

@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<div class="panel panel-default table-responsive">
    <div class="panel-heading">
        部门用户列表
    </div>
    <table class="table table-striped table-bordered">
        <thead>
            <tr>
                <th>用户ID</th>
                <th>用户名称</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var user in Model.DepUsersInfo.userlist)
            {
                <tr>
                    <td>@user.userid</td>
                    <td>@user.name</td>
                </tr>
            }
        </tbody>
    </table>
</div>


@using (Ajax.BeginForm("UserInfos", "home", new { }, new AjaxOptions { LoadingElementId = "loadingmsg", InsertionMode = InsertionMode.Replace, HttpMethod = "Post", UpdateTargetId = "main-content" }, new { @class = "form-horizontal", role = "form" }))
{
    <div class="panel panel-default">
        <div class="col-md-6 panel-body">
            <ul class="list-group ">
                @if (!string.IsNullOrEmpty(Model.UserInfo.avatar))
                {
                    <li class="list-group-item">
                        <img src="@(Model.UserInfo.avatar.Substring(0,Model.UserInfo.avatar.Length-1)+"64")" class="img-circle" />
                    </li>
                }
                <li class="list-group-item">
                    <div class="input-group ">
                        <label class="input-group-addon" for="UserInfo.userid">用户ID</label>
                        <input class="form-control " id="UserInfo_userid" name="UserInfo.userid" placeholder="用户ID" type="text" value="@Model.UserInfo.userid">
                    </div>
                </li>
                <li class="list-group-item">
                    <div class="input-group ">
                        <label class="input-group-addon" for="UserInfo.name">用户名称</label>
                         <input class="form-control " id="UserInfo_name" name="UserInfo.name" placeholder="用户名称" type="text" value="@Model.UserInfo.name">
                    </div>
                </li>
                <li class="list-group-item">
                    <div class="input-group ">
                        <label class="input-group-addon" for="UserInfo.tel">电话</label>
                        <input class="form-control " id="UserInfo_tel" name="UserInfo.tel" placeholder="用户ID" type="text" value="@Model.UserInfo.tel">

                      
                    </div>
                </li>
                <li class="list-group-item">
                    <div class="input-group ">
                        <label class="input-group-addon" for="UserInfo.email">Email</label>
                        <input class="form-control " id="UserInfo_email" name="UserInfo.email" placeholder="Email" type="text" value="@Model.UserInfo.email">
                    </div>
                </li>
                <li class="list-group-item">
                    <div class="input-group ">
                        <label class="input-group-addon" for="UserInfo.tel">部门ID</label>
                        <input class="form-control " id="DepartmentIds" name="DepartmentIds" placeholder="部门ID 逗号隔开" type="text" value="@Model.DepartmentIds">
                    </div>
                </li>
                <li class="list-group-item">
                    <div class="input-group ">
                        <label class="input-group-addon" for="UserInfo.weixinid">微信号</label>
                        <input class="form-control " id="UserInfo_weixinid" name="UserInfo.weixinid" placeholder="微信号" type="text" value="@Model.UserInfo.weixinid">

                    </div>
                </li>

                <li class="list-group-item">
                    <div class="input-group ">
                        <label class="input-group-addon" for="UserInfo.mobile">移动电话</label>
                        <input class="form-control " id="UserInfo_mobile" name="UserInfo.mobile" placeholder="移动电话" type="text" value="@Model.UserInfo.mobile">
                    </div>
                </li>

            </ul>
        </div>
        <div class="col-md-6 panel-body">
            <ul class="list-group ">
                <li class="list-group-item">
                    <div class="input-group ">
                        <label class="input-group-addon" for="UserInfo.position">职位信息</label>
                        <input class="form-control " id="UserInfo_position" name="UserInfo.position" placeholder="职位信息" type="text" value="@Model.UserInfo.position">
                   
                    </div>
                </li>
                <li class="list-group-item">

                    <div class="radio radio-inline">
                        <label>
                            <input type="radio" name="UserInfo.gender" id="genderrdo1" value="0" @(Model.UserInfo.gender==0?"checked":"")>
                            男
                        </label>
                    </div>
                    <div class="radio radio-inline">
                        <label>
                            <input type="radio" name="UserInfo.gender" id="genderrdo2" value="1" @(Model.UserInfo.gender == 1 ? "checked" : "")>
                            女
                        </label>
                    </div>
                </li>
                <li class="list-group-item">
                    <div class="radio radio-inline">
                        <label>
                            <input type="radio" name="UserInfo.enable" id="enablerdo1" value="0" @(Model.UserInfo.enable == 0 ? "checked" : "")>
                            禁用
                        </label>
                    </div>
                    <div class="radio radio-inline">
                        <label>
                            <input type="radio" name="UserInfo.enable" id="enablerdo2" value="1" @(Model.UserInfo.enable == 1 ? "checked" : "")>
                            启用
                        </label>
                    </div>
                </li>

                <li class="list-group-item">
                    <div class="radio radio-inline">
                        <label>
                            <input type="radio" name="UserInfo.status" id="statusrdo1" value="1" @(Model.UserInfo.status == 1 ? "checked" : "")>
                            已关注
                        </label>
                    </div>
                    <div class="radio radio-inline">
                        <label>
                            <input type="radio" name="UserInfo.status" id="statusrdo2" value="2" @(Model.UserInfo.status == 2 ? "checked" : "")>
                            未关注
                        </label>
                    </div>
                    <div class="radio radio-inline">
                        <label>
                            <input type="radio" name="UserInfo.status" id="statusrdo3" value ="4" @(Model.UserInfo.status == 4 ? "checked" : "")>
                            已冻结
                        </label>
                    </div>
                   
                </li>

                <li class="list-group-item">
                    <div class="radio radio-inline">
                        <label>
                            <input type="radio" name="OptType" id="optionsRadios1" value="add" checked>
                            新建
                        </label>
                    </div>
                    <div class="radio radio-inline">
                        <label>
                            <input type="radio" name="OptType" id="optionsRadios2" value="update">
                            更新
                        </label>
                    </div>
                    <div class="radio radio-inline">
                        <label>
                            <input type="radio" name="OptType" id="optionsRadios3" value="del">
                            删除
                        </label>
                    </div>
                    <div class="radio radio-inline">
                        <label>
                            <input type="radio" name="OptType" id="optionsRadios3" value="getuserinfo">
                            获取成员信息
                        </label>
                    </div>
                    <div class="radio radio-inline">
                        <label>
                            <input type="radio" name="OptType" id="optionsRadios3" value="getdepusersinfo">
                            获取部门成员信息
                        </label>
                    </div>
                </li>

                <li class="list-group-item">
                    <div class="row">
                        <div class="col-xs-6">
                            <input type="submit" class="btn  btn-primary btn-lg " value="提交" />
                        </div>
                    </div>
                </li>
            </ul>

        </div>
        @*<ul class="list-group ">
                <li class="list-group-item">
                    <div class="input-group ">
                        @Html.Label("用户ID", new { @class = "input-group-addon" })
                        @Html.TextBoxFor(m => m.UserInfo.userid, new { @class = "form-control  ", placeholder = "UserID" })
                    </div>

                    <div class="input-group ">
                        @Html.Label("用户名称", new { @class = "input-group-addon" })
                        @Html.TextBoxFor(m => m.UserInfo.name, new { @class = "form-control ", placeholder = "用户名称" })
                    </div>
                </li>
                <li class="list-group-item">
                </li>
                <li class="list-group-item">
                    <div class="input-group ">
                        @Html.Label("电话", new { @class = "input-group-addon" })
                        @Html.TextBoxFor(m => m.UserInfo.tel, new { @class = "form-control ", placeholder = "电话" })
                    </div>
                </li>
                <li class="list-group-item">
                    <div class="input-group ">
                        @Html.Label("Email", new { @class = "input-group-addon" })
                        @Html.TextBoxFor(m => m.UserInfo.email, new { @class = "form-control  ", placeholder = "Email" })
                    </div>
                </li>
                <li class="list-group-item">
                    <div class="input-group ">
                        @Html.Label("部门ID", new { @class = "input-group-addon" })
                        @Html.TextBoxFor(m => m.DepartmentIds, new { @class = "form-control  ", placeholder = "部门ID 逗号隔开" })
                    </div>
                </li>
                <li class="list-group-item">
                    <div class="input-group ">
                        @Html.Label("微信号", new { @class = "input-group-addon" })
                        @Html.TextBoxFor(m => m.UserInfo.weixinid, new { @class = "form-control  ", placeholder = "微信号" })
                    </div>
                </li>

                <li class="list-group-item">
                    <div class="input-group ">
                        @Html.Label("移动电话", new { @class = "input-group-addon" })
                        @Html.TextBoxFor(m => m.UserInfo.mobile, new { @class = "form-control  ", placeholder = "移动电话" })
                    </div>
                </li>

                <li class="list-group-item">
                    <div class="input-group ">
                        @Html.Label("职位信息", new { @class = "input-group-addon" })
                        @Html.TextBoxFor(m => m.UserInfo.position, new { @class = "form-control  ", placeholder = "职位信息" })
                    </div>
                </li>

                <li class="list-group-item">
                    <div class="input-group ">
                        @Html.Label("性别", new { @class = "input-group-addon" })
                        @Html.TextBoxFor(m => m.UserInfo.gender, new { @class = "form-control  ", placeholder = "性别" })
                    </div>
                </li>

                <li class="list-group-item">
                    <div class="input-group ">
                        @Html.Label("启用/禁用", new { @class = "input-group-addon" })
                        @Html.TextBoxFor(m => m.UserInfo.enable, new { @class = "form-control  ", placeholder = "启用/禁用" })
                    </div>
                </li>

                <li class="list-group-item">
                    <div class="input-group ">
                        @Html.Label("关注状态", new { @class = "input-group-addon" })
                        @Html.TextBoxFor(m => m.UserInfo.status, new { @class = "form-control  ", placeholder = "关注状态" })
                    </div>
                </li>

                <li class="list-group-item">
                    <div class="radio radio-inline">
                        <label>
                            <input type="radio" name="OptType" id="optionsRadios1" value="add" checked>
                            新建
                        </label>
                    </div>
                    <div class="radio radio-inline">
                        <label>
                            <input type="radio" name="OptType" id="optionsRadios2" value="update">
                            更新
                        </label>
                    </div>
                    <div class="radio radio-inline">
                        <label>
                            <input type="radio" name="OptType" id="optionsRadios3" value="del">
                            删除
                        </label>
                    </div>
                    <div class="radio radio-inline">
                        <label>
                            <input type="radio" name="OptType" id="optionsRadios3" value="getuserinfo">
                            获取成员信息
                        </label>
                    </div>
                    <div class="radio radio-inline">
                        <label>
                            <input type="radio" name="OptType" id="optionsRadios3" value="getdepusersinfo">
                            获取部门成员信息
                        </label>
                    </div>
                </li>

                <li class="list-group-item">
                    <div class="row">
                        <div class="col-xs-6">
                            <input type="submit" class="btn  btn-primary btn-lg " value="提交" />
                        </div>
                    </div>
                </li>
            </ul>*@
    </div>
}
